import request from '@/utils/request'

// 查询机柜信息列表
export function listCabinet(query) {
  return request({
    url: '/property/cabinet/list',
    method: 'get',
    params: query
  })
}
// 查询机房所有信息
export function allCabinet(query) {
  return request({
    url: '/property/cabinet/all',
    method: 'get',
    params: query
  })
}
// 查询机柜信息详细
export function getCabinet(cabinetId) {
  return request({
    url: '/property/cabinet/' + cabinetId,
    method: 'get'
  })
}

// 新增机柜信息
export function addCabinet(data) {
  return request({
    url: '/property/cabinet',
    method: 'post',
    data: data
  })
}

// 修改机柜信息
export function updateCabinet(data) {
  return request({
    url: '/property/cabinet',
    method: 'put',
    data: data
  })
}

// 删除机柜信息
export function delCabinet(cabinetId) {
  return request({
    url: '/property/cabinet/' + cabinetId,
    method: 'delete'
  })
}
